package com.tac.common.thread;

import com.tac.pojo.User;

public class Thread {

    private static final ThreadLocal<User> t1=new ThreadLocal<>();

     public  static void set(User user){
         t1.set(user);
     }
    public static User get(){
         return t1.get();
     }
    public static void remove(){
         t1.remove();
     }

     public static Integer getId(){
         Integer id = t1.get().getId();
         return id;
     }
}
